<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>

<div id="rrapp" v-cloak>

    <Modal title="发票信息" v-model="modalInvoice" :styles="{top: '20px'}">
        <i-form ref="formValidate" :model="order" :label-width="80">
            <Form-item label="发票类型" prop="invoiceType">
                <Radio-group v-model="order.invoiceType">
                    <Radio label="1" disabled>
                        <span>电子发票</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>纸质发票</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="抬头类型" prop="headerType">
                <Radio-group v-model="order.headerType">
                    <Radio label="1" disabled>
                        <span>个人</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>单位</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="发票抬头" prop="headerContent">
                <i-input v-model="order.headerContent" readonly/>
            </Form-item>
            <Form-item label="纳税识别码" prop="taxpayerIdentificationNumber" v-if="order.headerType==2">
                <i-input v-model="order.taxpayerIdentificationNumber" readonly/>
            </Form-item>
            <Form-item label="发票内容" prop="contentType">
                <Radio-group v-model="order.contentType">
                    <Radio label="1" disabled>
                        <span>商品明细</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>商品类别</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="手机号码" prop="invoicerMobile">
                <i-input v-model="order.invoicerMobile" readonly/>
            </Form-item>
            <Form-item label="收票人邮箱" prop="invoicerEmail">
                <i-input v-model="order.invoicerEmail" readonly/>
            </Form-item>
        </i-form>
    </Modal>

    <Modal title="物流详情" v-model="modalShipping" :styles="{top: '20px'}">
        <Time-line>
            <Timeline-Item color="green" v-for="item in orderTraces">{{item.AcceptTime}} : {{item.AcceptStation}}
            </Timeline-Item>
        </Time-line>
    </Modal>

    <Modal title="填写拒绝退款的理由" v-model="modalRefuseRefund" :styles="{top: '20px'}" @on-ok="refuseRefund">
        <i-form :label-width="100">
            <Form-item label="理由填写" prop="refundRefuseReson">
                <i-input v-model="refundRefuseReson" placeholder="拒绝退款的理由"/>
            </Form-item>
        </i-form>
    </Modal>

    <Modal title="订单详情" v-model="modalDetail" :styles="{top: '20px'}" width="800" @on-ok="orderUpdate">
        <p slot="title" style="height: auto">
            {{title}}
        </p>
        <i-form ref="formValidate" :model="order" :label-width="80">
            <Form-item label="订单号" prop="orderSn">
                <i-input v-model="order.orderSn" readonly/>
            </Form-item>
            <Form-item label="会员" prop="userName">
                <i-input v-model="order.userName" readonly/>
            </Form-item>
            <Form-item label="商品明细" prop="orderGoodsList">
                <Card>
                    <div v-for="item in order.orderGoodsList">
                        商品名称:{{item.goodsName}}
                        <br>
                        产品规格:{{item.productName}}
                        <br>
                        数量：{{item.number}}
                    </div>
                </Card>
            </Form-item>
            <!--<Form-item label="订单类型" prop="orderType">-->
            <!--<i-select v-model="order.orderType" disabled>-->
            <!--<i-option value="1">普通订单</i-option>-->
            <!--<i-option value="2">团购订单</i-option>-->
            <!--<i-option value="3">砍价订单</i-option>-->
            <!--</i-select>-->
            <!--</Form-item>-->
            <Form-item label="订单状态" prop="orderStatus" readonly>
                <Radio-group v-model="order.orderStatus">
                    <Radio label="0" disabled>
                        <span>待付款</span>
                    </Radio>
                    <Radio label="101" disabled>
                        <span>订单已取消</span>
                    </Radio>
                    <Radio label="102" disabled>
                        <span>订单已删除</span>
                    </Radio>
                    <Radio label="201" disabled>
                        <span>订单已付款</span>
                    </Radio>
                    <Radio label="300" disabled>
                        <span>订单已发货</span>
                    </Radio>
                    <Radio label="301" disabled>
                        <span>用户已收货</span>
                    </Radio>
                    <Radio label="302" disabled>
                        <span>用户已评论</span>
                    </Radio>
                    <Radio label="401" disabled>
                        <span>退款(没有收货)</span>
                    </Radio>
                    <Radio label="402" disabled>
                        <span>退款退货(已经收货)</span>
                    </Radio>
                    <Radio label="403" disabled>
                        <span>退款成功</span>
                    </Radio>
                    <Radio label="404" disabled>
                        <span>拒绝退款</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="发货状态" prop="shippingStatus">
                <Radio-group v-model="order.shippingStatus">
                    <Radio label="0" disabled>
                        <span>待发货</span>
                    </Radio>
                    <Radio label="1" disabled>
                        <span>已发货</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>已收货</span>
                    </Radio>
                    <Radio label="4" disabled>
                        <span>退货</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="付款状态" prop="payStatus">
                <Radio-group v-model="order.payStatus">
                    <Radio label="0" disabled>
                        <span>待付款</span>
                    </Radio>
                    <Radio label="1" disabled>
                        <span>付款中</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>已付款</span>
                    </Radio>
                    <Radio label="4" disabled>
                        <span>退款</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="收货人" prop="consignee">
                <i-input v-model="order.consignee" readonly/>
            </Form-item>
            <Form-item label="收货地址" prop="address">
                <i-input v-model="order.address" readonly/>
            </Form-item>
            <Form-item label="联系电话" prop="mobile">
                <i-input v-model="order.mobile" readonly/>
            </Form-item>
            <Form-item label="快递公司" prop="shippingName">
                <i-input v-model="order.shippingName" readonly/>
            </Form-item>
            <Form-item label="快递单号" prop="shippingNo">
                <i-input v-model="order.shippingNo" readonly/>
            </Form-item>
            <!--<Form-item label="付款方" prop="payName">-->
            <!--<i-input v-model="order.payName" readonly/>-->
            <!--</Form-item>-->
            <Form-item label="快递费用" prop="shippingFee">
                <i-input v-model="order.shippingFee" readonly/>
            </Form-item>
            <Form-item label="实际支付" prop="actualPrice">
                <i-input v-model="order.actualPrice" readonly/>
            </Form-item>
            <Form-item label="订单总价" prop="orderPrice">
                <i-input v-model="order.orderPrice" readonly/>
            </Form-item>
            <Form-item label="商品总价" prop="goodsPrice">
                <i-input v-model="order.goodsPrice" readonly/>
            </Form-item>
            <Form-item label="微信支付号" prop="transactionId">
                <i-input v-model="order.transactionId" readonly/>
            </Form-item>
            <Form-item label="下单时间" prop="addTime">
                <Date-picker v-model="order.addTime" placeholder="使用时间" readonly/>
            </Form-item>
            <Form-item label="付款时间" prop="payTime">
                <Date-picker v-model="order.payTime" placeholder="使用时间" readonly/>
            </Form-item>
            <Form-item label="买家备注" prop="postscript">
                <i-input v-model="order.postscript" readonly/>
            </Form-item>
            <Form-item label="卖家备注" prop="remark">
                <textarea v-model="order.remark" placeholder="内容" :rows="5" style="width:100%;"></textarea>
            </Form-item>
            <!--<Form-item label="配送费用" prop="freightPrice">-->
            <!--<i-input v-model="order.freightPrice" readonly/>-->
            <!--</Form-item>-->
        </i-form>
    </Modal>

    <div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
                </i-col>
                <i-button @click="query">查询</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("order:export"))
                <i-button type="success" @click="exportExcel">导出</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

</div>

<script src="${rc.contextPath}/js/shop/orderrefund.js?_${date.systemTime}"></script>
</body>
</html>